package com.ruoyi.project.mydy.actorimage.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mydy.actorimage.mapper.DlActorImageMapper;
import com.ruoyi.project.mydy.actorimage.domain.DlActorImage;
import com.ruoyi.project.mydy.actorimage.service.IDlActorImageService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 艺人图片Service业务层处理
 * 
 * @author mhg
 * @date 2021-10-10
 */
@Service
public class DlActorImageServiceImpl implements IDlActorImageService 
{
    @Autowired
    private DlActorImageMapper dlActorImageMapper;

    /**
     * 查询艺人图片
     * 
     * @param id 艺人图片主键
     * @return 艺人图片
     */
    @Override
    public DlActorImage selectDlActorImageById(Long id)
    {
        return dlActorImageMapper.selectDlActorImageById(id);
    }

    /**
     * 查询艺人图片列表
     * 
     * @param dlActorImage 艺人图片
     * @return 艺人图片
     */
    @Override
    public List<DlActorImage> selectDlActorImageList(DlActorImage dlActorImage)
    {
        return dlActorImageMapper.selectDlActorImageList(dlActorImage);
    }

    /**
     * 新增艺人图片
     * 
     * @param dlActorImage 艺人图片
     * @return 结果
     */
    @Override
    public int insertDlActorImage(DlActorImage dlActorImage)
    {
        dlActorImage.setCreateTime(DateUtils.getNowDate());
        return dlActorImageMapper.insertDlActorImage(dlActorImage);
    }

    /**
     * 修改艺人图片
     * 
     * @param dlActorImage 艺人图片
     * @return 结果
     */
    @Override
    public int updateDlActorImage(DlActorImage dlActorImage)
    {
        return dlActorImageMapper.updateDlActorImage(dlActorImage);
    }

    /**
     * 批量删除艺人图片
     * 
     * @param ids 需要删除的艺人图片主键
     * @return 结果
     */
    @Override
    public int deleteDlActorImageByIds(String ids)
    {
        return dlActorImageMapper.deleteDlActorImageByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除艺人图片信息
     * 
     * @param id 艺人图片主键
     * @return 结果
     */
    @Override
    public int deleteDlActorImageById(Long id)
    {
        return dlActorImageMapper.deleteDlActorImageById(id);
    }
}
